<!-- 营销管理 -->
<template>
  <div class="resStatistical">
    <div style=" margin-left: 120px;">
      <h2 style="text-align: left;">营销管理/优惠券设置</h2>
    </div>
    <div style="width: 100%; margin-bottom: 40px;"><hr /></div>
    <el-tabs
      style="padding-left: 20px;padding-right: 20px"
      v-model="activeName"
      type="card"
      @tab-click="handleClick"
    >
      <el-tab-pane label="效果统计" name="index" style="300px"></el-tab-pane>
      <el-tab-pane
        label="设置优惠券"
        name="activity"
        style="300px"
      ></el-tab-pane>
      <el-tab-pane label="一体机优惠券管理" name="aio"></el-tab-pane>
      <el-tab-pane label="发放优惠券" name="grant"></el-tab-pane>
    </el-tabs>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      activeName: "index",
    };
  },
  computed: {},
  methods: {
    handleClick(tab, event) {
      if (this.activeName == "index") {
        this.$router.push({
          path: "/index",
        });
      } else if (this.activeName == "activity") {
        this.$router.push({
          path: "/activity",
        });
      } else if (this.activeName == "aio") {
        this.$router.push({
          path: "/aio",
        });
      } else {
        this.$router.push({
          path: "/grant",
        });
      }
    },
  },
  mounted() {},
  created() {}, //生命周期 - 创建之后
};
</script>

<style scoped></style>
